{% extends "base.html" %}

{% block title %}{{ post.title }} - 万岛潜水{% endblock %}

{% block content %}
<div class="container mt-5">
    <div class="row">
        <div class="col-md-8 offset-md-2">
            <nav aria-label="breadcrumb">
                <ol class="breadcrumb">
                    <li class="breadcrumb-item"><a href="{{ url_for('main.index') }}">首页</a></li>
                    <li class="breadcrumb-item"><a href="{{ url_for('main.knowledge') }}">潜水知识</a></li>
                    <li class="breadcrumb-item active" aria-current="page">{{ post.title }}</li>
                </ol>
            </nav>
            
            <article class="blog-post">
                <h1 class="mb-4">{{ post.title }}</h1>
                <p class="text-muted">
                    <small>发布于: {{ post.created_at.strftime('%Y-%m-%d') }}</small>
                </p>
                
                {% if post.image %}
                <img src="{{ url_for('static', filename='uploads/' + post.image) }}" class="img-fluid rounded mb-4" alt="{{ post.title }}">
                {% endif %}
                
                <div class="blog-content">
                    {{ post.content|safe }}
                </div>
            </article>
            
            <div class="mt-5">
                <a href="{{ url_for('main.knowledge') }}" class="btn btn-outline-primary">
                    <i class="fas fa-arrow-left me-2"></i>返回潜水知识列表
                </a>
            </div>
        </div>
    </div>
</div>
{% endblock %} 